﻿namespace OverStore
{
    using OverStore.Exceptions;

    /// <summary>
    /// Allows to create instances of <see cref="IPersistenceSession"/>.
    /// </summary>
    public interface IPersistenceSessionFactory
    {
        /// <summary>
        /// Creates and returns new instance of <see cref="IPersistenceSession"/>.
        /// </summary>
        /// <returns>Properly initialized <see cref="IPersistenceSession"/> with specified configuration.</returns>
        /// <exception cref="ConfigurationException{IPersistenceSession}">Error occured during creating instance of <see cref="IPersistenceSession"/>.</exception>
        IPersistenceSession CreateSession();
    }
}